.TH std::atomic_ref::operator= 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_ref::operator= \- std::atomic_ref::operator=

.SH Synopsis
   T operator=( T desired ) const noexcept;             \fB(1)\fP \fI(since C++20)\fP
   atomic_ref& operator=( const atomic_ref& ) = delete; \fB(2)\fP \fI(since C++20)\fP

   1) Atomically assigns a value desired to the referenced object. Equivalent to
   store(desired).
   2) atomic_ref is not CopyAssignable.

.SH Parameters

   desired - value to assign

.SH Return value

   desired

.SH Notes

   Unlike most assignment operators, the assignment operator for atomic_ref does not
   return a reference to its left-hand argument. It returns a copy of the stored value
   instead.

.SH See also

   constructor   constructs an atomic_ref object
                 \fI(public member function)\fP
